﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Linq;
using System.Xml.Schema;
using System.Xml.XPath;
using System.Xml.Xsl;

namespace MsiValidator
{
    public static class ReadXML
    {
        public static void ReadRulesFromXmlFile(string XMLFileName)
        {
            if (File.Exists(XMLFileName))
            {
                XElement booksFromFile = XElement.Load(XMLFileName);

                var allFileLabels = (from f in booksFromFile.Descendants("rule")
                                     select f).ToList();
                foreach (var user in allFileLabels)
                    Console.WriteLine(user);

                //Console.Write(booksFromFile);
            }
        }
    }
}
